package com.qianke.common.util;

import org.apache.commons.codec.digest.DigestUtils;

public class PasswordUtil {

    public static String encode(String password, String salt) {
        try {
            return DigestUtils.md5Hex(DigestUtils.md5Hex(password) + salt);
        } catch (Exception e) {
            throw new RuntimeException("md5 error!");
        }
    }

    public static void main(String[] args) {
        System.out.println(PasswordUtil.encode("admin_111", "esty"));
    }
}
